from django.db import models


# Create your models here.
class PreRepairLog(models.Model):
    id = models.AutoField(primary_key=True)
    user = models.ForeignKey('custom_user.CustomUser',
                             on_delete=models.CASCADE)
    equipment = models.ForeignKey('equipments.Equipment',
                                 on_delete=models.CASCADE)
    create_date = models.DateField()
    reason = models.CharField(max_length=512)

    def __str__(self):
        return self.reason

    class Meta:
        verbose_name = '待维修'
        verbose_name_plural = '待维修清单'
